// domain/RmcRecord.java
package com.cscec5b.inspection.entity;

import com.cscec5b.inspection.common.ChecklistJsonConverter;
import com.cscec5b.inspection.common.DoubleListJsonConverter;
import com.cscec5b.inspection.common.StringListJsonConverter;
import jakarta.persistence.*;
//import lombok.Data;

import java.sql.Timestamp;
import java.time.LocalDateTime;
import java.util.List;
import java.util.Map;

//@Data
@Entity
@Table(name = "rmc_construction_record")
public class RmcRecord {
    @Id @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Long id;

    private Long projectId;

    private String weather;
    private String temperature;
    private Integer pageNo;

    private String supplyUnit;
    private String designStrength;
    private String mixPlant;
    private String contactPhone;
    @Column(name = "pouring_date_s")
    private LocalDateTime pouringDateS;
    @Column(name = "pouring_date_e")
    private LocalDateTime pouringDateE;
    private String slump;
    private String continuousTime;

    private String initialSetting;
    private String cubeStrength;

    // JSON：搅拌车编号
    @Convert(converter = StringListJsonConverter.class)
    @Column(columnDefinition = "json")
    private List<String> truckNos;

    // JSON：检查项 [{no,title,result}]
    @Convert(converter = ChecklistJsonConverter.class)
    @Column(columnDefinition = "json")
    private List<Map<String, Object>> checklist;

    private Integer samplingTimes;

    // JSON：取样值
    @Convert(converter = DoubleListJsonConverter.class)
    @Column(columnDefinition = "json")
    private List<Double> samplingValues;

    private Integer cubeGroupsCurr;
    private Integer cubeGroupsMid;
    private Integer cubeGroupsSpl;
    private String  rebarValue;

    @Lob
    @Column(name = "inspector_opin")
    private String inspectorOpin;

    private String recorder;
    private Boolean isTrue;

    @Column(insertable=false, updatable=false)
    private java.sql.Timestamp createdAt;
    @Column(insertable=false, updatable=false)
    private java.sql.Timestamp updatedAt;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Long getProjectId() {
        return projectId;
    }

    public void setProjectId(Long projectId) {
        this.projectId = projectId;
    }

    public String getWeather() {
        return weather;
    }

    public void setWeather(String weather) {
        this.weather = weather;
    }

    public String getTemperature() {
        return temperature;
    }

    public void setTemperature(String temperature) {
        this.temperature = temperature;
    }

    public Integer getPageNo() {
        return pageNo;
    }

    public void setPageNo(Integer pageNo) {
        this.pageNo = pageNo;
    }

    public String getSupplyUnit() {
        return supplyUnit;
    }

    public void setSupplyUnit(String supplyUnit) {
        this.supplyUnit = supplyUnit;
    }

    public String getDesignStrength() {
        return designStrength;
    }

    public void setDesignStrength(String designStrength) {
        this.designStrength = designStrength;
    }

    public String getMixPlant() {
        return mixPlant;
    }

    public void setMixPlant(String mixPlant) {
        this.mixPlant = mixPlant;
    }

    public String getContactPhone() {
        return contactPhone;
    }

    public void setContactPhone(String contactPhone) {
        this.contactPhone = contactPhone;
    }

    public LocalDateTime getPouringDateS() {
        return pouringDateS;
    }

    public void setPouringDateS(LocalDateTime pouringDateS) {
        this.pouringDateS = pouringDateS;
    }

    public LocalDateTime getPouringDateE() {
        return pouringDateE;
    }

    public void setPouringDateE(LocalDateTime pouringDateE) {
        this.pouringDateE = pouringDateE;
    }

    public String getSlump() {
        return slump;
    }

    public void setSlump(String slump) {
        this.slump = slump;
    }

    public String getContinuousTime() {
        return continuousTime;
    }

    public void setContinuousTime(String continuousTime) {
        this.continuousTime = continuousTime;
    }

    public String getInitialSetting() {
        return initialSetting;
    }

    public void setInitialSetting(String initialSetting) {
        this.initialSetting = initialSetting;
    }

    public String getCubeStrength() {
        return cubeStrength;
    }

    public void setCubeStrength(String cubeStrength) {
        this.cubeStrength = cubeStrength;
    }

    public List<String> getTruckNos() {
        return truckNos;
    }

    public void setTruckNos(List<String> truckNos) {
        this.truckNos = truckNos;
    }

    public List<Map<String, Object>> getChecklist() {
        return checklist;
    }

    public void setChecklist(List<Map<String, Object>> checklist) {
        this.checklist = checklist;
    }

    public Integer getSamplingTimes() {
        return samplingTimes;
    }

    public void setSamplingTimes(Integer samplingTimes) {
        this.samplingTimes = samplingTimes;
    }

    public List<Double> getSamplingValues() {
        return samplingValues;
    }

    public void setSamplingValues(List<Double> samplingValues) {
        this.samplingValues = samplingValues;
    }

    public Integer getCubeGroupsCurr() {
        return cubeGroupsCurr;
    }

    public void setCubeGroupsCurr(Integer cubeGroupsCurr) {
        this.cubeGroupsCurr = cubeGroupsCurr;
    }

    public Integer getCubeGroupsMid() {
        return cubeGroupsMid;
    }

    public void setCubeGroupsMid(Integer cubeGroupsMid) {
        this.cubeGroupsMid = cubeGroupsMid;
    }

    public Integer getCubeGroupsSpl() {
        return cubeGroupsSpl;
    }

    public void setCubeGroupsSpl(Integer cubeGroupsSpl) {
        this.cubeGroupsSpl = cubeGroupsSpl;
    }

    public String getRebarValue() {
        return rebarValue;
    }

    public void setRebarValue(String rebarValue) {
        this.rebarValue = rebarValue;
    }

    public String getInspectorOpin() {
        return inspectorOpin;
    }

    public void setInspectorOpin(String inspectorOpin) {
        this.inspectorOpin = inspectorOpin;
    }

    public String getRecorder() {
        return recorder;
    }

    public void setRecorder(String recorder) {
        this.recorder = recorder;
    }

    public Boolean getTrue() {
        return isTrue;
    }

    public void setTrue(Boolean aTrue) {
        isTrue = aTrue;
    }

    public Timestamp getCreatedAt() {
        return createdAt;
    }

    public void setCreatedAt(Timestamp createdAt) {
        this.createdAt = createdAt;
    }

    public Timestamp getUpdatedAt() {
        return updatedAt;
    }

    public void setUpdatedAt(Timestamp updatedAt) {
        this.updatedAt = updatedAt;
    }
}
